{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "df = pd.read_csv('round1_ijcai_18_train_20180301.txt',sep=' ')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>instance_id</th>\n",
       "      <th>item_id</th>\n",
       "      <th>item_category_list</th>\n",
       "      <th>item_property_list</th>\n",
       "      <th>item_brand_id</th>\n",
       "      <th>item_city_id</th>\n",
       "      <th>item_price_level</th>\n",
       "      <th>item_sales_level</th>\n",
       "      <th>item_collected_level</th>\n",
       "      <th>item_pv_level</th>\n",
       "      <th>...</th>\n",
       "      <th>context_page_id</th>\n",
       "      <th>predict_category_property</th>\n",
       "      <th>shop_id</th>\n",
       "      <th>shop_review_num_level</th>\n",
       "      <th>shop_review_positive_rate</th>\n",
       "      <th>shop_star_level</th>\n",
       "      <th>shop_score_service</th>\n",
       "      <th>shop_score_delivery</th>\n",
       "      <th>shop_score_description</th>\n",
       "      <th>is_trade</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>108641074714126964</td>\n",
       "      <td>3412720377098676069</td>\n",
       "      <td>7908382889764677758;5799347067982556520</td>\n",
       "      <td>2072967855524022579;5131280576272319091;263639...</td>\n",
       "      <td>1975590437749032870</td>\n",
       "      <td>3948283326616421003</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>4006</td>\n",
       "      <td>5799347067982556520:-1;509660095530134768:-1;5...</td>\n",
       "      <td>6765930309048922341</td>\n",
       "      <td>4</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5002</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5754713551599725161</td>\n",
       "      <td>3412720377098676069</td>\n",
       "      <td>7908382889764677758;5799347067982556520</td>\n",
       "      <td>2072967855524022579;5131280576272319091;263639...</td>\n",
       "      <td>1975590437749032870</td>\n",
       "      <td>3948283326616421003</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>4001</td>\n",
       "      <td>5799347067982556520:9172976955054793469;790838...</td>\n",
       "      <td>6765930309048922341</td>\n",
       "      <td>4</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5002</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>842679481291040981</td>\n",
       "      <td>3412720377098676069</td>\n",
       "      <td>7908382889764677758;5799347067982556520</td>\n",
       "      <td>2072967855524022579;5131280576272319091;263639...</td>\n",
       "      <td>1975590437749032870</td>\n",
       "      <td>3948283326616421003</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>4001</td>\n",
       "      <td>5799347067982556520:5131280576272319091;725801...</td>\n",
       "      <td>6765930309048922341</td>\n",
       "      <td>4</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5002</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>937088850059189027</td>\n",
       "      <td>3412720377098676069</td>\n",
       "      <td>7908382889764677758;5799347067982556520</td>\n",
       "      <td>2072967855524022579;5131280576272319091;263639...</td>\n",
       "      <td>1975590437749032870</td>\n",
       "      <td>3948283326616421003</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>4016</td>\n",
       "      <td>509660095530134768:-1;5799347067982556520:-1;7...</td>\n",
       "      <td>6765930309048922341</td>\n",
       "      <td>4</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5002</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>7975697065017708072</td>\n",
       "      <td>3412720377098676069</td>\n",
       "      <td>7908382889764677758;5799347067982556520</td>\n",
       "      <td>2072967855524022579;5131280576272319091;263639...</td>\n",
       "      <td>1975590437749032870</td>\n",
       "      <td>3948283326616421003</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>4001</td>\n",
       "      <td>5799347067982556520:9172976955054793469;790838...</td>\n",
       "      <td>6765930309048922341</td>\n",
       "      <td>4</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5002</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 27 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           instance_id              item_id  \\\n",
       "0   108641074714126964  3412720377098676069   \n",
       "1  5754713551599725161  3412720377098676069   \n",
       "2   842679481291040981  3412720377098676069   \n",
       "3   937088850059189027  3412720377098676069   \n",
       "4  7975697065017708072  3412720377098676069   \n",
       "\n",
       "                        item_category_list  \\\n",
       "0  7908382889764677758;5799347067982556520   \n",
       "1  7908382889764677758;5799347067982556520   \n",
       "2  7908382889764677758;5799347067982556520   \n",
       "3  7908382889764677758;5799347067982556520   \n",
       "4  7908382889764677758;5799347067982556520   \n",
       "\n",
       "                                  item_property_list        item_brand_id  \\\n",
       "0  2072967855524022579;5131280576272319091;263639...  1975590437749032870   \n",
       "1  2072967855524022579;5131280576272319091;263639...  1975590437749032870   \n",
       "2  2072967855524022579;5131280576272319091;263639...  1975590437749032870   \n",
       "3  2072967855524022579;5131280576272319091;263639...  1975590437749032870   \n",
       "4  2072967855524022579;5131280576272319091;263639...  1975590437749032870   \n",
       "\n",
       "          item_city_id  item_price_level  item_sales_level  \\\n",
       "0  3948283326616421003                 3                 3   \n",
       "1  3948283326616421003                 3                 3   \n",
       "2  3948283326616421003                 3                 3   \n",
       "3  3948283326616421003                 3                 3   \n",
       "4  3948283326616421003                 3                 3   \n",
       "\n",
       "   item_collected_level  item_pv_level    ...     context_page_id  \\\n",
       "0                     4             14    ...                4006   \n",
       "1                     4             14    ...                4001   \n",
       "2                     4             14    ...                4001   \n",
       "3                     4             14    ...                4016   \n",
       "4                     4             14    ...                4001   \n",
       "\n",
       "                           predict_category_property              shop_id  \\\n",
       "0  5799347067982556520:-1;509660095530134768:-1;5...  6765930309048922341   \n",
       "1  5799347067982556520:9172976955054793469;790838...  6765930309048922341   \n",
       "2  5799347067982556520:5131280576272319091;725801...  6765930309048922341   \n",
       "3  509660095530134768:-1;5799347067982556520:-1;7...  6765930309048922341   \n",
       "4  5799347067982556520:9172976955054793469;790838...  6765930309048922341   \n",
       "\n",
       "   shop_review_num_level  shop_review_positive_rate  shop_star_level  \\\n",
       "0                      4                        1.0             5002   \n",
       "1                      4                        1.0             5002   \n",
       "2                      4                        1.0             5002   \n",
       "3                      4                        1.0             5002   \n",
       "4                      4                        1.0             5002   \n",
       "\n",
       "   shop_score_service  shop_score_delivery shop_score_description  is_trade  \n",
       "0                 1.0                  1.0                    1.0         0  \n",
       "1                 1.0                  1.0                    1.0         0  \n",
       "2                 1.0                  1.0                    1.0         0  \n",
       "3                 1.0                  1.0                    1.0         0  \n",
       "4                 1.0                  1.0                    1.0         0  \n",
       "\n",
       "[5 rows x 27 columns]"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "7571023501622243456    3001\n",
       "2986722878397696833    2836\n",
       "5410526681843914464    2578\n",
       "2079092401639430105    2515\n",
       "2709839111509701702    2448\n",
       "5716046650492250518    2267\n",
       "5467735841796001072    2258\n",
       "2723541945574109807    2021\n",
       "3444647220397515150    1937\n",
       "4817583173619024436    1919\n",
       "4162406225225963765    1780\n",
       "7937690818610877888    1683\n",
       "8970449145125394567    1631\n",
       "534920639711707822     1608\n",
       "751443051994527892     1596\n",
       "671302156973073367     1591\n",
       "5634978682268415449    1571\n",
       "5586531724608162781    1528\n",
       "2349124492995958413    1403\n",
       "2530039332833674681    1397\n",
       "509936336103770855     1396\n",
       "5088920748697829728    1377\n",
       "4885486757349832183    1368\n",
       "3401173841796395052    1339\n",
       "4429962171977692955    1321\n",
       "7697581527441910922    1260\n",
       "8906948455106358440    1249\n",
       "8961114074287787809    1245\n",
       "6335890202072992021    1219\n",
       "7085665113142227362    1197\n",
       "                       ... \n",
       "3060939257974287768       1\n",
       "4315671443944469316       1\n",
       "2450461432566567913       1\n",
       "6917824747442463165       1\n",
       "1231435154406244323       1\n",
       "5671259814204429434       1\n",
       "1992790623956190566       1\n",
       "6924417868274441024       1\n",
       "2643110915351000337       1\n",
       "1565252648892065430       1\n",
       "5805260258702689314       1\n",
       "47232536977255645         1\n",
       "986162197059178173        1\n",
       "2409954994290829097       1\n",
       "5927738321422819423       1\n",
       "2481143040037338088       1\n",
       "4369782325622770923       1\n",
       "608541768168808568        1\n",
       "6719025529135817442       1\n",
       "4703285171493358092       1\n",
       "195602920141131596        1\n",
       "4132318734910769781       1\n",
       "7999608879329667099       1\n",
       "5217883985010868817       1\n",
       "4080717746850109736       1\n",
       "2985880080851733292       1\n",
       "2738970586530567908       1\n",
       "6000001972507910258       1\n",
       "7242922127907807081       1\n",
       "1122726572965313772       1\n",
       "Name: item_id, Length: 10075, dtype: int64"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.item_id.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "df_item = df.item_id.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "pandas.core.series.Series"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(df_item)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "6623155320259774450    1\n",
       "8895036804141578062    1\n",
       "472995455484629540     1\n",
       "4719854051490318987    1\n",
       "5997344082500488395    1\n",
       "6682645376627265035    1\n",
       "9144650182086233156    1\n",
       "1927340205994496245    1\n",
       "5269625657709528806    1\n",
       "445328798119765287     1\n",
       "7316161597835961894    1\n",
       "345540811693445587     1\n",
       "3856468015206552079    1\n",
       "7415246130738024397    1\n",
       "467691276773676121     1\n",
       "3311215078541711037    1\n",
       "1046138178161060643    1\n",
       "107416371975425984     1\n",
       "7766017281603222621    1\n",
       "5485270466388847471    1\n",
       "7618144456536837923    1\n",
       "7461322462322712063    1\n",
       "8006415588815049178    1\n",
       "3297171438762735257    1\n",
       "5992187786248336405    1\n",
       "5856554977409989742    1\n",
       "5371517440008778133    1\n",
       "85791493116673035      1\n",
       "7796918205564434287    1\n",
       "90652556660047174      1\n",
       "                      ..\n",
       "3060939257974287768    1\n",
       "4315671443944469316    1\n",
       "2450461432566567913    1\n",
       "6917824747442463165    1\n",
       "1231435154406244323    1\n",
       "5671259814204429434    1\n",
       "1992790623956190566    1\n",
       "6924417868274441024    1\n",
       "2643110915351000337    1\n",
       "1565252648892065430    1\n",
       "5805260258702689314    1\n",
       "47232536977255645      1\n",
       "986162197059178173     1\n",
       "2409954994290829097    1\n",
       "5927738321422819423    1\n",
       "2481143040037338088    1\n",
       "4369782325622770923    1\n",
       "608541768168808568     1\n",
       "6719025529135817442    1\n",
       "4703285171493358092    1\n",
       "195602920141131596     1\n",
       "4132318734910769781    1\n",
       "7999608879329667099    1\n",
       "5217883985010868817    1\n",
       "4080717746850109736    1\n",
       "2985880080851733292    1\n",
       "2738970586530567908    1\n",
       "6000001972507910258    1\n",
       "7242922127907807081    1\n",
       "1122726572965313772    1\n",
       "Name: item_id, Length: 2047, dtype: int64"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_item[df_item==1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "7571023501622243456    3001\n",
       "2986722878397696833    2836\n",
       "5410526681843914464    2578\n",
       "2079092401639430105    2515\n",
       "2709839111509701702    2448\n",
       "5716046650492250518    2267\n",
       "5467735841796001072    2258\n",
       "2723541945574109807    2021\n",
       "3444647220397515150    1937\n",
       "4817583173619024436    1919\n",
       "4162406225225963765    1780\n",
       "7937690818610877888    1683\n",
       "8970449145125394567    1631\n",
       "534920639711707822     1608\n",
       "751443051994527892     1596\n",
       "671302156973073367     1591\n",
       "5634978682268415449    1571\n",
       "5586531724608162781    1528\n",
       "2349124492995958413    1403\n",
       "2530039332833674681    1397\n",
       "509936336103770855     1396\n",
       "5088920748697829728    1377\n",
       "4885486757349832183    1368\n",
       "3401173841796395052    1339\n",
       "4429962171977692955    1321\n",
       "7697581527441910922    1260\n",
       "8906948455106358440    1249\n",
       "8961114074287787809    1245\n",
       "6335890202072992021    1219\n",
       "7085665113142227362    1197\n",
       "                       ... \n",
       "754831522169451822        2\n",
       "801943223866146692        2\n",
       "6468017735548130508       2\n",
       "3745864642880363253       2\n",
       "8241116106015913121       2\n",
       "6694066024564279724       2\n",
       "8555978242774412558       2\n",
       "1918036076684525817       2\n",
       "7487291141760056360       2\n",
       "6917995274967839606       2\n",
       "6603710408841739878       2\n",
       "5727564552607152204       2\n",
       "6907894310763849555       2\n",
       "6723396698557022603       2\n",
       "5372922084664406393       2\n",
       "8583049411938426667       2\n",
       "892990417005468924        2\n",
       "382148433835957245        2\n",
       "7989676812397211337       2\n",
       "3309104635424386469       2\n",
       "8409644879593084294       2\n",
       "2354263587656174293       2\n",
       "316401447255832439        2\n",
       "6124953603864827589       2\n",
       "1443847186951149512       2\n",
       "4186530858371816263       2\n",
       "6623138995162276126       2\n",
       "4933983909971258953       2\n",
       "2300835874067676248       2\n",
       "2390895940217114928       2\n",
       "Name: item_id, Length: 8028, dtype: int64"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_item[df_item!=1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "7571023501622243456    3001\n",
       "2986722878397696833    2836\n",
       "5410526681843914464    2578\n",
       "2079092401639430105    2515\n",
       "2709839111509701702    2448\n",
       "5716046650492250518    2267\n",
       "5467735841796001072    2258\n",
       "2723541945574109807    2021\n",
       "3444647220397515150    1937\n",
       "4817583173619024436    1919\n",
       "4162406225225963765    1780\n",
       "7937690818610877888    1683\n",
       "8970449145125394567    1631\n",
       "534920639711707822     1608\n",
       "751443051994527892     1596\n",
       "671302156973073367     1591\n",
       "5634978682268415449    1571\n",
       "5586531724608162781    1528\n",
       "2349124492995958413    1403\n",
       "2530039332833674681    1397\n",
       "509936336103770855     1396\n",
       "5088920748697829728    1377\n",
       "4885486757349832183    1368\n",
       "3401173841796395052    1339\n",
       "4429962171977692955    1321\n",
       "7697581527441910922    1260\n",
       "8906948455106358440    1249\n",
       "8961114074287787809    1245\n",
       "6335890202072992021    1219\n",
       "7085665113142227362    1197\n",
       "                       ... \n",
       "7089830609070921136      11\n",
       "4677906550397666034      11\n",
       "8494951353253389242      11\n",
       "4314533993476441017      11\n",
       "3875232896984947281      11\n",
       "3806031993502102461      11\n",
       "6234305659896277244      11\n",
       "1512844274463530826      11\n",
       "5845929203886474324      11\n",
       "1690955358501016541      11\n",
       "148515419065775916       11\n",
       "6895833826671539323      11\n",
       "6664839079448194188      11\n",
       "280128814777818124       11\n",
       "8045729013263964682      11\n",
       "4707949835047704580      11\n",
       "6334438829178070909      11\n",
       "8481928034649427343      11\n",
       "1546362922594443529      11\n",
       "1455117818802593506      11\n",
       "7177869771823287253      11\n",
       "6885009346014956451      11\n",
       "3797244542649718555      11\n",
       "4891372624314117776      11\n",
       "4782588626514377100      11\n",
       "7950341335872902457      11\n",
       "597493732133088019       11\n",
       "4754497470392113242      11\n",
       "3749242530581156519      11\n",
       "367849422134217202       11\n",
       "Name: item_id, Length: 4220, dtype: int64"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_item[df_item>10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>instance_id</th>\n",
       "      <th>item_id</th>\n",
       "      <th>item_category_list</th>\n",
       "      <th>item_property_list</th>\n",
       "      <th>item_brand_id</th>\n",
       "      <th>item_city_id</th>\n",
       "      <th>item_price_level</th>\n",
       "      <th>item_sales_level</th>\n",
       "      <th>item_collected_level</th>\n",
       "      <th>item_pv_level</th>\n",
       "      <th>...</th>\n",
       "      <th>context_page_id</th>\n",
       "      <th>predict_category_property</th>\n",
       "      <th>shop_id</th>\n",
       "      <th>shop_review_num_level</th>\n",
       "      <th>shop_review_positive_rate</th>\n",
       "      <th>shop_star_level</th>\n",
       "      <th>shop_score_service</th>\n",
       "      <th>shop_score_delivery</th>\n",
       "      <th>shop_score_description</th>\n",
       "      <th>is_trade</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>108641074714126964</td>\n",
       "      <td>3412720377098676069</td>\n",
       "      <td>7908382889764677758;5799347067982556520</td>\n",
       "      <td>2072967855524022579;5131280576272319091;263639...</td>\n",
       "      <td>1975590437749032870</td>\n",
       "      <td>3948283326616421003</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>4006</td>\n",
       "      <td>5799347067982556520:-1;509660095530134768:-1;5...</td>\n",
       "      <td>6765930309048922341</td>\n",
       "      <td>4</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5002</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>5754713551599725161</td>\n",
       "      <td>3412720377098676069</td>\n",
       "      <td>7908382889764677758;5799347067982556520</td>\n",
       "      <td>2072967855524022579;5131280576272319091;263639...</td>\n",
       "      <td>1975590437749032870</td>\n",
       "      <td>3948283326616421003</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>4001</td>\n",
       "      <td>5799347067982556520:9172976955054793469;790838...</td>\n",
       "      <td>6765930309048922341</td>\n",
       "      <td>4</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5002</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>842679481291040981</td>\n",
       "      <td>3412720377098676069</td>\n",
       "      <td>7908382889764677758;5799347067982556520</td>\n",
       "      <td>2072967855524022579;5131280576272319091;263639...</td>\n",
       "      <td>1975590437749032870</td>\n",
       "      <td>3948283326616421003</td>\n",
       "      <td>3</td>\n",
       "      <td>3</td>\n",
       "      <td>4</td>\n",
       "      <td>14</td>\n",
       "      <td>...</td>\n",
       "      <td>4001</td>\n",
       "      <td>5799347067982556520:5131280576272319091;725801...</td>\n",
       "      <td>6765930309048922341</td>\n",
       "      <td>4</td>\n",
       "      <td>1.0</td>\n",
       "      <td>5002</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3 rows × 27 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "           instance_id              item_id  \\\n",
       "0   108641074714126964  3412720377098676069   \n",
       "1  5754713551599725161  3412720377098676069   \n",
       "2   842679481291040981  3412720377098676069   \n",
       "\n",
       "                        item_category_list  \\\n",
       "0  7908382889764677758;5799347067982556520   \n",
       "1  7908382889764677758;5799347067982556520   \n",
       "2  7908382889764677758;5799347067982556520   \n",
       "\n",
       "                                  item_property_list        item_brand_id  \\\n",
       "0  2072967855524022579;5131280576272319091;263639...  1975590437749032870   \n",
       "1  2072967855524022579;5131280576272319091;263639...  1975590437749032870   \n",
       "2  2072967855524022579;5131280576272319091;263639...  1975590437749032870   \n",
       "\n",
       "          item_city_id  item_price_level  item_sales_level  \\\n",
       "0  3948283326616421003                 3                 3   \n",
       "1  3948283326616421003                 3                 3   \n",
       "2  3948283326616421003                 3                 3   \n",
       "\n",
       "   item_collected_level  item_pv_level    ...     context_page_id  \\\n",
       "0                     4             14    ...                4006   \n",
       "1                     4             14    ...                4001   \n",
       "2                     4             14    ...                4001   \n",
       "\n",
       "                           predict_category_property              shop_id  \\\n",
       "0  5799347067982556520:-1;509660095530134768:-1;5...  6765930309048922341   \n",
       "1  5799347067982556520:9172976955054793469;790838...  6765930309048922341   \n",
       "2  5799347067982556520:5131280576272319091;725801...  6765930309048922341   \n",
       "\n",
       "   shop_review_num_level  shop_review_positive_rate  shop_star_level  \\\n",
       "0                      4                        1.0             5002   \n",
       "1                      4                        1.0             5002   \n",
       "2                      4                        1.0             5002   \n",
       "\n",
       "   shop_score_service  shop_score_delivery shop_score_description  is_trade  \n",
       "0                 1.0                  1.0                    1.0         0  \n",
       "1                 1.0                  1.0                    1.0         0  \n",
       "2                 1.0                  1.0                    1.0         0  \n",
       "\n",
       "[3 rows x 27 columns]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.head(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "9021"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sum(df.is_trade)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda root]",
   "language": "python",
   "name": "conda-root-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
